/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.bld.model.query.consultaweb;

import br.com.bld.util.facade.AbstractBe;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Pedro
 */
public class QueryBe extends AbstractBe {

    public QueryBe() throws SQLException {
        super();
    }

    public QueryBe(Connection conn) {
        super(conn);
    }

    public Collection<ConsultaWebPb> consultar(String palavraChave, String cidade, String uf, Integer numrPagina, Integer qtdePorPagina) throws SQLException {
        ConsultaWebQDao dao = new ConsultaWebQDao(conn);

        return dao.consultar(palavraChave, cidade, uf, numrPagina, qtdePorPagina);
    }

    public Collection<ConsultaWebPb> consultar(String palavraChave, Integer numrPagina, Integer qtdePorPagina) throws SQLException {
        ConsultaWebQDao dao = new ConsultaWebQDao(conn);

        return dao.consultar(palavraChave, numrPagina, qtdePorPagina);
    }

    public static void main(String[] args) throws SQLException {
        Collection<ConsultaWebPb> coll = new QueryBe().consultar("farmacia", 0, 20);
    }
}
